import request from '@/router/axios'

export function fetchDictList () {
	  return request({
	    url: '/dict/tree/custom',
	    method: 'get'
	  })
	}

export function fetchList (query) {
  return request({
    url: '/sys/dictItem/page',
    method: 'get',
    params: query
  })
}

export function addObj (obj) {
  return request({
    url: '/sys/dictItem/',
    method: 'post',
    data: obj
  })
}

export function getObj (id) {
  return request({
    url: '/sys/dictItem/' + id,
    method: 'get'
  })
}

export function delObj (id) {
  return request({
    url: '/sys/dictItem/' + id,
    method: 'delete'
  })
}

export function putObj (obj) {
  return request({
    url: '/sys/dictItem/',
    method: 'put',
    data: obj
  })
}
